package cn.edu.scau.cmi.yangzhichao.client;


import cn.edu.scau.cmi.yangzhichao.adapter.AdapterViewController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

public class AdapterClient extends Application {
    private Stage primaryStage;
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        this.primaryStage=primaryStage;
        this.primaryStage.setTitle("实验四：适配器模式");
        try {
            FXMLLoader loader=new FXMLLoader();
            loader.setLocation(AdapterViewController.class.getResource("AdapterView.fxml"));
            AnchorPane anchorPane=(AnchorPane)loader.load();
            Scene scene=new Scene(anchorPane);
            primaryStage.setScene(scene);
            primaryStage.setResizable(false);
            primaryStage.show();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
